﻿using System;

namespace OpenWaves.EPiServer.Localization
{
    public class TranslationKey : TranslationEntry, IEquatable<TranslationKey>
    {
        public TranslationKey(string name, TranslationKeyCollection parent)
            : base(name, parent)
        {
        }

        public bool Equals(TranslationKey other)
        {
            return base.Equals(other);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            return this.Equals(obj as TranslationKey);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public static bool operator ==(TranslationKey left, TranslationKey right)
        {
            return Equals(left, right);
        }

        public static bool operator !=(TranslationKey left, TranslationKey right)
        {
            return !Equals(left, right);
        }
    }
}
